package com.xrz.dao;

import com.xrz.pojo.GroupInfo;
import com.xrz.pojo.vo.GroupInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

@Mapper
public interface GroupInfoDao {
    int deleteByPrimaryKey(Integer id);

    int insert(GroupInfo record);

    int insertSelective(GroupInfo record);

    GroupInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(GroupInfo record);

    int updateByPrimaryKey(GroupInfo record);

    Collection<GroupInfo> getAllGroup();

    List<GroupInfoVo> selectGroupUserId(Integer groupId);

    int getGroupCountByGroupId(Integer groupId);


    int deleteByGroupId(Integer groupId);

    List<GroupInfo> selectByGroupId(Integer groupId);

    int deleteByGroupIdAndUserId(@Param("groupId") Integer groupId,@Param("userId") Integer userId);
}